package com.xr.blog.service.impl;

import com.xr.blog.dao.SysPermissionMapper;
import com.xr.blog.pojo.SysPermission;
import com.xr.blog.service.SysPermissionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import java.util.HashSet;
import java.util.List;
import java.util.Set;


@Service("sysPermissionService")
public class SysPermissionServiceImpl extends ServiceImpl<SysPermissionMapper, SysPermission> implements SysPermissionService {

    @Autowired
    SysPermissionMapper sysPermissionMapper;

    /**
     * 获取权限
     *
     * @param id 用户id
     * @return 权限信息
     */
    @Override
    public Set<String> getMenuPermission(Long id) {
        List<String> list=sysPermissionMapper.selectMenuPermission(id);
        return new HashSet(list);
    }
}